package com.order.food.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.order.food.mapper.OrderFoodMapper;
import com.order.food.domain.OrderFood;
import com.order.food.service.IOrderFoodService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 食物管理Service业务层处理
 * 
 * @author huhu
 * @date 2020-08-19
 */
@Service
public class OrderFoodServiceImpl implements IOrderFoodService
{
    @Autowired
    private OrderFoodMapper orderFoodMapper;

    /**
     * 查询食物管理
     * 
     * @param foodId 食物管理ID
     * @return 食物管理
     */
    @Override
    public OrderFood selectOrderFoodById(Long foodId)
    {
        return orderFoodMapper.selectOrderFoodById(foodId);
    }

    /**
     * 查询食物管理列表
     * 
     * @param orderFood 食物管理
     * @return 食物管理
     */
    @Override
    public List<OrderFood> selectOrderFoodList(OrderFood orderFood)
    {
        return orderFoodMapper.selectOrderFoodList(orderFood);
    }

    /**
     * 新增食物管理
     * 
     * @param orderFood 食物管理
     * @return 结果
     */
    @Override
    public int insertOrderFood(OrderFood orderFood)
    {
        return orderFoodMapper.insertOrderFood(orderFood);
    }

    /**
     * 修改食物管理
     * 
     * @param orderFood 食物管理
     * @return 结果
     */
    @Override
    public int updateOrderFood(OrderFood orderFood)
    {
        return orderFoodMapper.updateOrderFood(orderFood);
    }

    /**
     * 删除食物管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteOrderFoodByIds(String ids)
    {
        return orderFoodMapper.deleteOrderFoodByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除食物管理信息
     * 
     * @param foodId 食物管理ID
     * @return 结果
     */
    @Override
    public int deleteOrderFoodById(Long foodId)
    {
        return orderFoodMapper.deleteOrderFoodById(foodId);
    }

    @Override
    public List<OrderFood> selectOrderFoodNamePrice() {
        return orderFoodMapper.selectOrderFoodNamePrice();
    }

    @Override
    public List<OrderFood> selectOrderFoodNamePrice1() {
        return orderFoodMapper.selectOrderFoodNamePrice1();
    }

    @Override
    public List<OrderFood> selectOrderFoodNamePrice2() {
        return orderFoodMapper.selectOrderFoodNamePrice2();
    }


}
